<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>业务员组织结构图</title>
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/jquery.jOrgChart.css" />
<link rel="stylesheet" href="css/custom.css" />
<link href="css/prettify.css" type="text/css" rel="stylesheet" />

<script type="text/javascript" src="prettify.js"></script>

<!-- jQuery includes -->
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript" src="jquery-ui.min.js"></script>

<script src="jquery.jOrgChart.js"></script>

</head>

<body onLoad="prettyPrint();">
	<ul id="org" style="display:none">
	  
	</ul>
	<div id="chart" class="orgChart"></div>

	<script>
		var url = window.location + "";
		var id = url.substring(url.indexOf("?id=") + 4, url.length);
       	$.get("../ywy/jOrgChart/GroupImage",{Id:id},function(json){
        		$("#org").empty().append(json.data);
        		$("#org").jOrgChart({
		            chartElement : '#chart',
		            dragAndDrop  : false
		        }); 
        		
        		 $("#show-list").click(function(e){
                     e.preventDefault();
                     
                     $('#list-html').toggle('fast', function(){
                         if($(this).is(':visible')){
                             $('#show-list').text('Hide underlying list.');
                             $(".topbar").fadeTo('fast',0.9);
                         }else{
                             $('#show-list').text('Show underlying list.');
                             $(".topbar").fadeTo('fast',1);                  
                         }
                     });
                 });
                 
                 $('#list-html').text($('#org').html());
                 
        		 $("#org").bind("DOMSubtreeModified", function() {
                     $('#list-html').text('');
                     
                     $('#list-html').text($('#org').html());
                     
                     prettyPrint();                
                 });
        	});

    </script>

</body>
</html>
